<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .a{
            width: 300px;
            height: 300px;
            background-image:linear-gradient(to bottom right, red,blue) ;

        }
        .b{
            width: 300px;
            height: 300px;
            background-image: linear-gradient(90deg,green,orange);
        }
        .c{
            width: 300px;
            height: 300px;
            background-image: linear-gradient(red,green,orange);
        }
        .d{
            width: 300px;
            height: 300px;
            background-image: linear-gradient(rgba(0,0,0,1),rgba(0,0,0,0));
            /* rgba的第四个值是透明度。 */

        }
        .e{
            width: 300px;
            height: 300px;
            background-image: repeating-linear-gradient(red,green,blue 10%);
        }
    </style>
</head>
<body>
    <div class="a"></div>
    <div class="b"></div>
    <div class="c"></div>
    <div class="d"></div>
    <div class="e"></div>
</body>
</html>